home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / tlhelp32.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  3.4 KB  |  126 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'TLHelp32.pas' rev: 3.00
  6.  
  7. #ifndef TLHelp32HPP
  8. #define TLHelp32HPP
  9. #include <Windows.hpp>
  10. #include <SysInit.hpp>
  11. #include <System.hpp>
  12.  
  13. //-- user supplied -----------------------------------------------------------
  14.  
  15. namespace Tlhelp32
  16. {
  17. //-- type declarations -------------------------------------------------------
  18. struct THeapList32;
  19. typedef THeapList32 *PHeapList32;
  20.  
  21. struct THeapList32
  22. {
  23.     int dwSize;
  24.     int th32ProcessID;
  25.     int th32HeapID;
  26.     int dwFlags;
  27. } ;
  28.  
  29. struct THeapEntry32;
  30. typedef THeapEntry32 *PHeapEntry32;
  31.  
  32. struct THeapEntry32
  33. {
  34.     int dwSize;
  35.     int hHandle;
  36.     int dwAddress;
  37.     int dwBlockSize;
  38.     int dwFlags;
  39.     int dwLockCount;
  40.     int dwResvd;
  41.     int th32ProcessID;
  42.     int th32HeapID;
  43. } ;
  44.  
  45. struct TProcessEntry32;
  46. typedef TProcessEntry32 *PProcessEntry32;
  47.  
  48. struct TProcessEntry32
  49. {
  50.     int dwSize;
  51.     int cntUsage;
  52.     int th32ProcessID;
  53.     int th32DefaultHeapID;
  54.     int th32ModuleID;
  55.     int cntThreads;
  56.     int th32ParentProcessID;
  57.     int pcPriClassBase;
  58.     int dwFlags;
  59.     char szExeFile[260];
  60. } ;
  61.  
  62. struct TThreadEntry32;
  63. typedef TThreadEntry32 *PThreadEntry32;
  64.  
  65. struct TThreadEntry32
  66. {
  67.     int dwSize;
  68.     int cntUsage;
  69.     int th32ThreadID;
  70.     int th32OwnerProcessID;
  71.     int tpBasePri;
  72.     int tpDeltaPri;
  73.     int dwFlags;
  74. } ;
  75.  
  76. struct TModuleEntry32;
  77. typedef TModuleEntry32 *PModuleEntry32;
  78.  
  79. struct TModuleEntry32
  80. {
  81.     int dwSize;
  82.     int th32ModuleID;
  83.     int th32ProcessID;
  84.     int GlblcntUsage;
  85.     int ProccntUsage;
  86.     Byte *modBaseAddr;
  87.     int modBaseSize;
  88.     Windows::HINST hModule;
  89.     char szModule[256];
  90.     char szExePath[260];
  91. } ;
  92.  
  93. //-- var, const, procedure ---------------------------------------------------
  94. #define MAX_MODULE_NAME32 (Byte)(255)
  95. #define TH32CS_SNAPHEAPLIST (Byte)(1)
  96. #define TH32CS_SNAPPROCESS (Byte)(2)
  97. #define TH32CS_SNAPTHREAD (Byte)(4)
  98. #define TH32CS_SNAPMODULE (Byte)(8)
  99. #define TH32CS_SNAPALL (Byte)(15)
  100. #define TH32CS_INHERIT (int)(0x80000000)
  101. #define HF32_DEFAULT (Byte)(1)
  102. #define HF32_SHARED (Byte)(2)
  103. #define LF32_FIXED (Byte)(1)
  104. #define LF32_FREE (Byte)(2)
  105. #define LF32_MOVEABLE (Byte)(4)
  106. extern "C" int __stdcall CreateToolhelp32Snapshot(int dwFlags, int th32ProcessID);
  107. extern "C" BOOL __stdcall Heap32ListFirst(int hSnapshot, THeapList32 &lphl);
  108. extern "C" BOOL __stdcall Heap32ListNext(int hSnapshot, THeapList32 &lphl);
  109. extern "C" BOOL __stdcall Heap32First(THeapEntry32 &lphe, int th32ProcessID, int th32HeapID);
  110. extern "C" BOOL __stdcall Heap32Next(THeapEntry32 &lphe);
  111. extern "C" BOOL __stdcall Toolhelp32ReadProcessMemory(int th32ProcessID, void * lpBaseAddress, void 
  112.     *lpBuffer, int cbRead, int &lpNumberOfBytesRead);
  113. extern "C" BOOL __stdcall Process32First(int hSnapshot, TProcessEntry32 &lppe);
  114. extern "C" BOOL __stdcall Process32Next(int hSnapshot, TProcessEntry32 &lppe);
  115. extern "C" BOOL __stdcall Thread32First(int hSnapshot, TThreadEntry32 &lpte);
  116. extern "C" BOOL __stdcall Thread32Next(int hSnapshot, TThreadEntry32 &lpte);
  117. extern "C" BOOL __stdcall Module32First(int hSnapshot, TModuleEntry32 &lpme);
  118. extern "C" BOOL __stdcall Module32Next(int hSnapshot, TModuleEntry32 &lpme);
  119.  
  120. }    /* namespace Tlhelp32 */
  121. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  122. using namespace Tlhelp32;
  123. #endif
  124. //-- end unit ----------------------------------------------------------------
  125. #endif    // TLHelp32
  126.